home *** CD-ROM | disk | FTP | other *** search
- include macros.asm
- begincom reset
- jmp initial
- ;****************************************************************************
- ;
- ; Data Area
- ;
- ;****************************************************************************
-
- ipladdr label dword ;hardware reset address
- dw 0
- dw 0FFFFh
-
- old15 label dword ;bios int 15 address
- old15off dw 0
- old15seg dw 0
-
- counter dw 0
-
- ;****************************************************************************
- ;
- ; Int 15 Handler
- ;
- ;****************************************************************************
- int15:
- chksys: cmp ax,8500H ;is it a sys req?
- jne kbcheck
- inc cs:counter
- cmp cs:counter,3 ;3 strikes?
- je ipl ;you're out!
- kbcheck:
- cmp ah,91H ;is it a keyboard?
- jne skipit
- mov cs:counter,0
- skipit:
- jmp cs:old15 ;go to BIOS int 15 handler
-
-
- ipl:
- cli ;make damn sure ints are off
- mov ax,0 ;set up addressing for core clobber
- mov es,ax
- mov di,ax ;es:di --> low core
- mov cx,8000h ;words to clobber
- rep stosw ;destroy DOS
- jmp cs:ipladdr
-
-
- endres equ $
-
- ;****************************************************************************
- ;
- ; Initialization
- ;
- ;****************************************************************************
- msg db 10,13,"Sys Request Reset Program",10,13
- db "Copyright (C) 1988 by Robert A. Murphy",10,13
- db "All Rights Reserved.",10,13,'$';
- initial:
- mov ax,3515h ;get old vector
- int 21h
- mov old15off,bx
- mov old15seg,es ;save old int15
- lea dx,int15 ;get new int 15
- mov ax,2515h ;set new vector
- int 21h
- lea dx,msg
- mov ah,9
- int 21h
- lea dx,endres
- int 27h
-
- endcom reset